package com.muyu.user.domain.resp;

import com.muyu.user.domain.model.SysUserGroupPageQueryModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 用户分组分页接口返回结果集
 *
 * @author liuguoqiang
 * @date 2025-09-14
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "用户分组分页接口返回结果集")
public class SysUserGroupPageResp {

    /**
     * 分组ID
     */
    @Schema(name = "groupId", title = "分组ID", description = "分组ID" )
    private Long groupId;

    /**
     * 分组名称
     */
    @Schema(name = "groupName", title = "分组名称", description = "分组名称" , required = true)
    private String groupName;

    /**
     * 信息构造器
     */
    public static SysUserGroupPageResp infoBuild(SysUserGroupPageQueryModel pageQueryModel){
        return SysUserGroupPageResp.builder()
            .groupId(pageQueryModel.getGroupId())
            .groupName(pageQueryModel.getGroupName())
            .build();
    }

}
